﻿using Confluent.Kafka;

namespace MQTestConsoleApp
{
    class Program
    {
        static void Main(string[] args)
        {



            ProducerConfig conf = new Confluent.Kafka.ProducerConfig
            {
                Acks = Confluent.Kafka.Acks.Leader,
                BootstrapServers = "127.0.0.1:9092",
                RetryBackoffMs = 10000,
                MessageSendMaxRetries = 10000,
                EnableIdempotence = true,
            };
            ProducerBuilder<Null, string> producerBuilder = new ProducerBuilder<Null, string>(conf);
            var producer = producerBuilder.Build();
            var msg = new Message<Null, string>
            {
                Value = "22",
            };
            producer.Produce("sstt", msg, Callback);
            //producer.call
        }

        private static void Callback(DeliveryReport<Null, string> report)
        {
            //report.Status
        }
    }
}